package cn.core.tool.rest;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 请求封装
 */
public abstract class CoreController {

  /**
   * 保存
   */
  public static final String save = "save";

  /**
   * 批量保存
   */
  public static final String saveBatch = "saveBatch";

  /**
   * 修改
   */
  public static final String update = "update";

  /**
   * 批量修改
   */
  public static final String updateBatch = "updateBatch";

  /**
   * 删除
   */
  public static final String remove = "remove";

  /**
   * 批量删除
   */
  public static final String removeBatch = "removeBatch";

  /**
   * 数据量
   */
  public static final String count = "count";

  /**
   * 主键查询
   */
  public static final String pk = "pk";

  /**
   * 查询
   */
  public static final String query = "query";

  /**
   * 分页
   */
  public static final String paging = "paging";

  /**
   * 业务数据量
   */
  public static final String countVo = "countVo";

  /**
   * 业务主键查询
   */
  public static final String pkVo = "pkVo";

  /**
   * 业务查询
   */
  public static final String queryVo = "queryVo";

  /**
   * 业务分页
   */
  public static final String pagingVo = "pagingVo";

  /**
   * 保存成功
   */
  public static final String succSave = "信息保存成功！";

  /**
   * 修改成功
   */
  public static final String succUpdate = "信息修改成功！";

  /**
   * 删除成功
   */
  public static final String succRemove = "信息删除成功！";

  @Resource
//  @Autowired(required = false)
  private HttpServletRequest httpServletRequest;

  @Resource
//  @Autowired(required = false)
  private HttpServletResponse httpServletResponse;

  public HttpServletRequest getHttpServletRequest() {
    return httpServletRequest;
  }

  public HttpServletResponse getHttpServletResponse() {
    return httpServletResponse;
  }

}
